package com.java46.struts2.base.entity;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.beans.Transient;
import java.util.List;
import java.util.Objects;

/**
 * @ClassName TDishestypeEntity
 * @Description 菜品类型信息
 * @Author zuxia
 * @Date 2018/7/17 14:38
 * @Vcrsion 1.0
 **/
@Entity
@Table(name = "t_dishestype", schema = "fullboydb")
public class TDishestypeEntity {
    private int dTypeId;
    private String dTypeName;
    @Id
    @Column(name = "dTypeId")
    @GenericGenerator(name = "t_dishestype",strategy = "identity")
    @GeneratedValue(generator = "t_dishestype")
    public int getdTypeId() {
        return dTypeId;
    }

    public void setdTypeId(int dTypeId) {
        this.dTypeId = dTypeId;
    }

    @Basic
    @Column(name = "dTypeName")
    public String getdTypeName() {
        return dTypeName;
    }

    public void setdTypeName(String dTypeName) {
        this.dTypeName = dTypeName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TDishestypeEntity that = (TDishestypeEntity) o;
        return dTypeId == that.dTypeId &&
                Objects.equals(dTypeName, that.dTypeName);
    }

    @Override
    public int hashCode() {

        return Objects.hash(dTypeId, dTypeName);
    }
}
